package com.ruoyi.system.service.impl;

import com.ruoyi.common.core.text.Convert;
import com.ruoyi.system.mapper.JiajiaHomeActivityMapper;
import com.ruoyi.system.domain.JiajiaHomeActivity;
import com.ruoyi.system.service.IJiajiaHomeActivityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 首页活动信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-03-07
 */
@Service
public class JiajiaHomeActivityServiceImpl implements IJiajiaHomeActivityService 
{
    @Autowired
    private JiajiaHomeActivityMapper jiajiaHomeActivityMapper;

    /**
     * 查询首页活动信息
     * 
     * @param id 首页活动信息主键
     * @return 首页活动信息
     */
    @Override
    public com.ruoyi.system.domain.JiajiaHomeActivity selectJiajiaHomeActivityById(Long id)
    {
        return jiajiaHomeActivityMapper.selectJiajiaHomeActivityById(id);
    }

    /**
     * 查询首页活动信息列表
     * 
     * @param jiajiaHomeActivity 首页活动信息
     * @return 首页活动信息
     */
    @Override
    public List<JiajiaHomeActivity> selectJiajiaHomeActivityList(JiajiaHomeActivity jiajiaHomeActivity)
    {
        return jiajiaHomeActivityMapper.selectJiajiaHomeActivityList(jiajiaHomeActivity);
    }

    /**
     * 新增首页活动信息
     * 
     * @param jiajiaHomeActivity 首页活动信息
     * @return 结果
     */
    @Override
    public int insertJiajiaHomeActivity(JiajiaHomeActivity jiajiaHomeActivity)
    {
        return jiajiaHomeActivityMapper.insertJiajiaHomeActivity(jiajiaHomeActivity);
    }

    /**
     * 修改首页活动信息
     * 
     * @param jiajiaHomeActivity 首页活动信息
     * @return 结果
     */
    @Override
    public int updateJiajiaHomeActivity(JiajiaHomeActivity jiajiaHomeActivity)
    {
        return jiajiaHomeActivityMapper.updateJiajiaHomeActivity(jiajiaHomeActivity);
    }

    /**
     * 批量删除首页活动信息
     * 
     * @param ids 需要删除的首页活动信息主键
     * @return 结果
     */
    @Override
    public int deleteJiajiaHomeActivityByIds(String ids)
    {
        return jiajiaHomeActivityMapper.deleteJiajiaHomeActivityByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除首页活动信息信息
     * 
     * @param id 首页活动信息主键
     * @return 结果
     */
    @Override
    public int deleteJiajiaHomeActivityById(Long id)
    {
        return jiajiaHomeActivityMapper.deleteJiajiaHomeActivityById(id);
    }
}
